package com.io.file;

import java.io.FileWriter;
import java.io.IOException;

/**
 * @author xin.ding
 * @date 2019/12/20 17:13
 */
public class FileUtils {
    private FileUtils() {
        throw new IllegalAccessError();
    }

    /**
     * write content to a text file
     *
     * @param fileName 文件名
     * @param content  内容
     * @throws Exception
     */
    private void writeFile(String fileName, String content) throws IOException {
        FileWriter writer = new FileWriter(fileName);
        writer.write(content);
        writer.flush();
        writer.close();
    }
}
